<template>
    <div>
        <el-menu :default-active="activeIndex2"
                 class="el-menu-demo"
                 mode="horizontal"
                 background-color="#545c64"
                 text-color="#fff"
                 active-text-color="#ffd04b"
                 @select="handleSelect"
                 :router="true">
            <el-menu-item index="/manage/index">
                <el-icon>
                    <HomeFilled />
                </el-icon>
                首页</el-menu-item>
            <el-sub-menu index="4">
                <template #title>
                    <el-icon>
                        <Van />
                    </el-icon>
                    采购</template>
                <el-menu-item index="/manage/GoodsProcure/goodsProcureOrder">采购单</el-menu-item>
                <el-menu-item index="4-3">采购退货单</el-menu-item>
                <el-menu-item index="/manage/goodsProcure/goodsSupplier">供应商管理</el-menu-item>
            </el-sub-menu>
            <el-sub-menu index="7">
                <template #title>
                    <el-icon>
                        <List />
                    </el-icon>
                    销售</template>
                <el-menu-item index="7-1">销售订单</el-menu-item>
                <el-menu-item index="7-2">销售单</el-menu-item>
                <el-menu-item index="7-3">销售退货申请</el-menu-item>
                <el-menu-item index="7-3">销售退货单</el-menu-item>
            </el-sub-menu>

            <el-sub-menu index="2">
                <template #title>
                    <el-icon>
                        <School />
                    </el-icon>
                    仓库</template>
                <el-menu-item index="/manage/goodsWarehouse/goodsWarehouseSearch">库存查询</el-menu-item>
                <el-menu-item index="/manage/goodsWarehouse/goodsWarehouseDetail">库存流水</el-menu-item>
                <el-menu-item index="/manage/goodsWarehouse/goodsWarehouse">仓库管理</el-menu-item>
            </el-sub-menu>
            <el-sub-menu>
                <template #title>
                    <el-icon>
                        <GoodsFilled />
                    </el-icon>
                    商品</template>
                <el-menu-item index="/manage/goods/goodsType">商品分类</el-menu-item>
                <el-menu-item index="/manage/goods/goods">商品管理</el-menu-item>
            </el-sub-menu>
            <el-menu-item index="/manage/goodsStore">
                <el-icon>
                    <OfficeBuilding />
                </el-icon>
                门店与员工</el-menu-item>
            <el-menu-item index="6">
                <el-icon>
                    <MessageBox />
                </el-icon>
                打印模板</el-menu-item>
        </el-menu>
    </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'

const activeIndex = ref('1')
const activeIndex2 = ref('1')
const handleSelect = (key: string, keyPath: string[]) => {
    console.log(key, keyPath)
}
</script>

<style lang="scss" scoped></style>